Release 10.1A: OpenEdge Development:
Java Open Clients


SQL ResultSet streaming and call-back sequence

Java Open Client support for TABLE and TABLE-HANDLE parameters depends on a call-back mechanism used by both the client application and the proxy code. Therefore, either the client application or the proxy always must request data from the sender, rather than having the sender set or send the data. As a result, the client application calls back to the proxy for output parameters, and the proxy calls back to the client application for input parameters.

Table C–2 shows how the call-back sequence works when passing an INPUT TABLE or TABLE-HANDLE parameter.

Table C–2: Passing an INPUT temp-table as an SQL ResultSet
Client application
Proxy
1)  Creates input ResultSet object.
2)  Passes ResultSet object as a parameter to proxy.
3)  Uses methods on the input ResultSet
      object to get data.
4)  Passes input data to the AppServer.

Table C–3 shows how the call-back sequence works when passing an OUTPUT TABLE or TABLE-HANDLE parameter.

Table C–3: Passing an OUTPUT temp-table as an SQL ResultSet
Client application
Proxy
1)  Creates holder object for the output result
      set.
2)  Passes holder object to proxy.
3)  Gets output data from the AppServer.
4)  Creates output ResultSet object and
      stores it in holder object.
5)  Returns to client.
6)  Uses methods on the ResultSet contained in the holder object.

Table C–4 shows how the call-back sequence works when passing an INPUT-OUTPUT TABLE or TABLE-HANDLE parameter.

Table C–4: Passing an INPUT-OUTPUT temp-table as an SQL ResultSet 
Client Application
Proxy
1)  Creates holder object.
2)  Creates input ResultSet object and stores it in holder.
3)  Passes holder object to proxy.
4)  Uses methods on the ResultSet in the
      holder object to get data.
5)  Passes input data to the AppServer.
6)  Gets output data from the AppServer.
7)  Creates output ResultSet object and
      stores it in holder object.
8)  Returns to client.
9)  Uses methods on the ResultSet in the
      holder object to get data.

The input ResultSet object is an object written by the Java client application. This also can be a standard ResultSet object available as the result of a SQL query (a java.sql.ResultSet). In contrast, the output ResultSet object always is provided by the generated proxy.


Copyright © 2005 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095